<?php
/**
 * Created by PhpStorm.
 * User: wjj
 * Date: 2016/11/1
 */

namespace app\logic;

use app\models\Adv;
use app\models\Area;
use app\models\Mall;

class CommonLogic
{
    public function getArea($parent_code,$level){
        return Area::find()->where(['parent_code'=>$parent_code,'region_level'=>$level])->asArray()->all();
    }

    public function getMall($mall_id){
        return Mall::find()->select('mall_name,mall_color,hide_title,adv_pic,adv_link,mall_style')->where(['mall_id'=>$mall_id])->asArray()->one();
    }

}